<template>
    <div class="">

        <el-menu @select="select" active-text-color="#ffd04b" background-color="#545c64" class="el-menu-vertical-demo"
            default-active="2" text-color="#fff">
            <el-sub-menu index="1">
                <template #title>
                    <el-icon>
                        <location />
                    </el-icon>
                    <span>权限管理</span>
                </template>
                <el-menu-item index="/user">用户管理</el-menu-item>
                <el-menu-item index="1-3">菜单管理</el-menu-item>
                <el-menu-item index="1-4">角色管理</el-menu-item>
            </el-sub-menu>

        </el-menu>
    </div>


</template>

<script setup lang="ts" name="MisMenu">
import { useRouter } from "vue-router";

//useRouter hook 函数  --  React 的概念， 组合式函数
const router = useRouter();


function select(index: string, indexs: string[]) {
    console.log(index, indexs);
    router.push(index);
}
</script>

<style scoped></style>